using System;
using Domain.Engine.Events;
using SimpleCqrs.Domain;

namespace Domain.Engine.Domain
{
  public class GameAggregate : AggregateRoot
  {
    public GameAggregate()
    {
    }

    public GameAggregate(Guid id)
    {
      Apply(new NewGameStartedEvent
      {
        AggregateRootId = id
      });
    }

    public void OnNewGameStarted(NewGameStartedEvent newGameStartedEvent)
    {
      Id = newGameStartedEvent.AggregateRootId;
    }
  }
}